<?php print $this->doctype()?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
	<?php
		print $this->headBase();
    	print $this->headMeta();
    	print $this->headTitle();
    	print $this->headScript();
    	print $this->headLink();
    	print $this->headStyle();
    ?>
</head>

<body>

<div id="wrapper">
	<?php print $this->partial('_partial/head.phtml')?>
	
	<?php
		/* @var KontorX_View_Helper_FlashMessages */
		$messages = $this->getHelper('flashMessages')->get();
		if (count($messages)):
	?>
	<ul id="kx_flash_messages">
		<?php foreach ($messages as $message):?>
		<li class="kx_item"><?php print $message?></li>
		<?php endforeach; ?>
	</ul>
	<?php endif;?>
	
	<div id="bar">
		<ul>
			<li class="breadcrumb">
			<b>Obecnie znajdujesz się w:</b>
				<a href="<?php print $this->url(array(),'shop-main', true)?>">Sklep</a>&nbsp;
				<?php
					/* @var $nav Promotor_View_Helper_ShopCategoryNavigation */
					$nav = $this->getHelper('ShopCategoryNavigation')->shopCategoryNavigation();

					$c = $nav->getContainer();

					$nav = $this->getHelper('Navigation')
						->findHelper('breadcrumbs')
						->setMinDepth(-1)
						->setContainer($c);
								 

					// znajdz aktywną stronę!
					if (null != ($page = $c->findBy('alias', $this->urlParams('alias',$this->urlParams('category'))))) {
						$page->setActive(true);
					}
					
					print $nav->setLinkLast(true)
							  ->setSeparator('&nbsp;')
							  ->render();
				?>
			</li>
			<li class="kontakt"><a href="<?php print $this->url(array('alias' => 'kontakt'),'site')?>"><b>Kontakt</b></a></li>
		</ul>
	</div>

	<div id="site-content" class="shop">
		<div id="shop-cart-wrapper">
			<div id="shop-cart">
				<?php print $this->getHelper('ShopCart')->render('_partial/shop-cart.phtml');?>
				
				<?php
				// print $this->getHelper('ShopCart')
					//			 ->render('<a href="'.$this->url(array(),'shop-cart').'">zobacz zamawiane produkty &raquo;</a>', true)
				?>
				
			</div>
		</div>
		<div id="sidebar">
		
			<div class="listbox categories">
				<h2>Kategorie produktów</h2>
				<div class="list">
				<?php
					/* @var $navigation Promotor_View_Helper_ShopCategoryNavigation */
					$navigation = $this->getHelper('ShopCategoryNavigation')->shopCategoryNavigation();
					$navigation
						->setMinDepth(0)
						->setDefaultProxy('menu');

					print $navigation->render();
				?>
				</div>
			</div>
			
			<div class="specialProducts featured">
				<h2>Polecane produkty</h2>
				
				<?php
					print $this->getHelper('ShopPromotions')
							   ->shopPromotions()
							   ->render();
				?>

			</div>
		
		</div>
		
		<div id="main">
			<div class="radius_top"></div>
			
			<div class="products">
				<?php print $this->layout()->content?>
			</div>
			<div class="radius_bottom"></div>
		</div>
	</div>
	
	<div id="footer" class="sg">
		<?php print $this->partial('_partial/foot.phtml')?>
	</div>
</div>
<?php print $this->inlineScript()?>
</body>
</html>